Skip to content

fix(hooks): emit PostToolUse additional context - #609

Merged
Lum1104 merged 3 commits into
Egonex-AI:mainfrom
KumamuKuma:fix/posttooluse-additional-context
Jul 30, 2026
Merged

fix(hooks): emit PostToolUse additional context#609
Lum1104 merged 3 commits into
Egonex-AI:mainfrom
KumamuKuma:fix/posttooluse-additional-context

Conversation

@KumamuKuma

Copy link
Copy Markdown
Contributor

Summary

  • extract the inline PostToolUse auto-update logic into a portable Node handler
  • emit hookSpecificOutput.additionalContext so the instruction reaches model context
  • preserve the existing Git-operation, config, graph, and .ua fallback guards
  • add regression coverage for successful triggers and silent failure paths

Context

Follow-up to #598. That PR fixed the hook input by reading the PostToolUse payload from stdin, but the handler still wrote a plain-text message to stdout. PostToolUse ignores plain stdout, so the commit-triggered auto-update instruction was never added to model context.

Validation

  • pnpm lint
  • pnpm --filter @understand-anything/core build
  • pnpm --filter @understand-anything/skill build
  • pnpm --filter understand-anything-viewer build
  • pnpm --filter @understand-anything/core test
  • pnpm test (new hook tests: 14/14)
  • Python helper suite: 95 tests, 1 skipped
  • git diff --check origin/main...HEAD

@Lum1104

Lum1104 commented Jul 30, 2026

Copy link
Copy Markdown
Collaborator

@codex review this

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Delightful!

Reviewed commit: 21a7fbb16f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@Lum1104
Lum1104 merged commit fe8c5bc into Egonex-AI:main Jul 30, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants